Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add type annotations and type checking #36

Merged
merged 2 commits into from
Aug 13, 2023
Merged

Conversation

AndrewADev
Copy link
Owner

@AndrewADev AndrewADev commented Aug 13, 2023

Add type hinting, and use mypy to perform type checking as part of the CI checks.

For now this is only added to the main code, and not the tests.

Add type hinting, and use mypy to perform type checking as part of the CI checks.
Fix an issue where referencing the class as a type caused a NameError.

We do this by allowing forward references, see here: https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#forward-references
@AndrewADev AndrewADev marked this pull request as ready for review August 13, 2023 18:27
@AndrewADev AndrewADev merged commit 9f361e4 into main Aug 13, 2023
1 check passed
@AndrewADev AndrewADev deleted the chore/add-types branch August 13, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant